﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Visa.DB;

namespace VisaApp.Models
{
    public class TuyendungModel
    {
        public int ID { get; set; }
        public string Title { get; set; }
        public Nullable<System.DateTime> HanNop { get; set; }
        public Nullable<System.DateTime> NgayTao { get; set; }
        public string NoiDung { get; set; }
        public Nullable<int> Soluong { get; set; }
        public Nullable<bool> Staus { get; set; }
        public string MetaKeywords { get; set; }
        public string MetaDescription { get; set; }
        public string MetaTitle { get; set; }

        public static void MapFrom(TuyendungModel model, ref TuyenDung entity)
        {
            entity.ID = model.ID;
            entity.Title = model.Title;
            entity.HanNop = model.HanNop;
            entity.NgayTao = model.NgayTao;
            entity.NoiDung = model.NoiDung;
            entity.Soluong = model.Soluong;
            entity.Staus = model.Staus;
            entity.MetaKeywords = model.MetaKeywords;
            entity.MetaDescription = model.MetaDescription;
            entity.MetaTitle = model.MetaTitle;
        }

        public static void MapFrom(TuyenDung entity, ref TuyendungModel model)
        {
            model.ID = entity.ID;
            model.Title = entity.Title;
            model.HanNop = entity.HanNop;
            model.NgayTao = entity.NgayTao;
            model.NoiDung = entity.NoiDung;
            model.Soluong = entity.Soluong;
            model.Staus = entity.Staus;
            model.MetaKeywords = entity.MetaKeywords;
            model.MetaDescription = entity.MetaDescription;
            model.MetaTitle = entity.MetaTitle;
        }

    }
}